home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Timing / Etime.lha / Etime / etime.doc < prev    next >
Encoding:
Text File  |  1990-01-31  |  4.9 KB  |  106 lines

  1.  
  2.        Program:  etime
  3.     Programmer:  George Kerber
  4.        Written:  07/16/89 - 08/05/89
  5.        Version:  1.03
  6.    Application:  AmigaDOS
  7.        Purpose:  This utility will provide an elapsed time display.
  8.                  The elapsed time will be displayed as hh:mm:ss or seconds. 
  9.         
  10.         SYNTAX:  etime [[? -r -s -n -d -# ] [path]TIMERNAME ]
  11.  
  12.                       ?   same as no option, a help screen will be displayed.
  13.                      -r   etime file will be retained.
  14.                      -s   The elapsed time will be returned in seconds.
  15.                      -n   A newline after output. 
  16.                      -d   unconditionally delete etime file and reset.
  17.                      -1   white
  18.                      -2   black
  19.                      -3   orange
  20.                      -5   bold face
  21.                      -6   underline
  22.                      -7   italics
  23.                    path   default is ram:etime.
  24.  
  25.   Installation:  Simply copy etime to your c: directory.  Or execute
  26.                  the install script called etime.install.
  27.  
  28.                            execute etime.install
  29.  
  30.                  The etime.install script provides an example of the one of
  31.                  the possible uses for etime.  Even if you don't use the
  32.                  etime.install script, take a look at it anyway.
  33.  
  34.     Directions:  Execute etime with a timername to start the timer. 
  35.                  Execute etime again with the same timername and the elapsed
  36.                  time will be displayed as hh:mm:ss.  If the -s option is 
  37.                  used the elapsed time will be displayed in total seconds
  38.                  only.  Normally the etime file is deleted, the -r option
  39.                  will retain the file for later use.  Any number of timers
  40.                  can be in use at any time.  The -n option will
  41.                  prevent a newline after the elapsed time is displayed.
  42.                  This option works the same as the NOLINE option for the
  43.                  AmigaDOS echo command
  44.       
  45. Considerations:  If only a timername is supplied, etime will attempt to write
  46.                  the etime file in ram:etime (the directory will be created
  47.                  if necessary).  If a full path name is supplied for the
  48.                  etime file, it will be used instead of the default.  Since
  49.                  the etime default directory is in ram:, etime files will
  50.                  not survive a reboot.  If you want an etime file to survive
  51.                  a reboot, you will have to specify a full path name for the
  52.                  etime file on a disk instead of ram:.
  53.  
  54.       Examples:  So what good is it?
  55.  
  56.                  Try executing your programs using batch files, and start an
  57.                  etime timer as one of the first commands in the batch file.
  58.                  
  59.                  ....
  60.                  etime -d startprogram  ;start timer named startprogram.
  61.                  ....                   ;-d to insure no other etimers have
  62.                  ....                   ;this name
  63.                  execute your program.....
  64.                  ....
  65.                  echo "*n*n  Program Duration: " NOLINE
  66.                  etime startprogram  ;end timer and display the elapsed time
  67.                  ....
  68.  
  69.                  Now whenever you quit your program, the elapsed time will
  70.                  be displayed for the time you were using the program.
  71.  
  72.                  -----------------------------------------------------------
  73.  
  74.                  Use the -s option and the IF command to have certain
  75.                  commands performed only if enough time has passed.
  76.  
  77.                  ....
  78.                  etime -d timername1 ; start timer named timername1
  79.                  ....
  80.                  ....
  81.                  do stuff here
  82.                  ....
  83.                  etime > env:seconds -s timername1  ;end timer and place
  84.                                                     ;the elapsed seconds into
  85.                                                     ;an environmental variable
  86.                                                     ;called seconds
  87.                  if $seconds gt 60 VAL  ;compare elapsed seconds to 60
  88.                    echo "More than 60 seconds elapsed between start and finish"
  89.                    else
  90.                    echo "Less than 60 seconds elapsed between start and finish"
  91.                    endif
  92.                                  
  93.                  Get the idea.....
  94.  
  95.  
  96.         Status:  This is public domain, but please keep me as author and
  97.                  keep all the documentation intact.  Anyway, if something
  98.                  is wrong with this program, I'm not responsible.....
  99.  
  100.  
  101.         History:  v1.02:  initial release.
  102.                   v1.03:  learned about getting options and added a bunch.
  103.                           etime no longer uses ENV:, it creates it's own
  104.                           directory in ram: or allows the user to specify
  105.                           an alternative.
  106.